/*
 * @,@Author: ,: your name
 * @,@Date: ,: 2021-01-11 09:00:48
 * @,@LastEditTime: ,: 2021-01-11 14:46:55
 * @,@LastEditors: ,: Please set LastEditors
 * @,@Description: ,: In User Settings Edit
 * @,@FilePath: ,: \wx-mall\src\api\extensionApi.js
 */
import request from 'utils/request'

let config = {
    headers: {
        'Content-Type': 'application/json' //之前说的以表单传数据的格式来传递fromdata
    }
}

export const applyPromoter = (params) => request.post('/p/shareSaleCenter', params) //申請分享的状态，以及通过的页面数据 已改版

export const submitPromoter = (params) => request.post('/p/applyShareSale', params, config) //提交申请 已改版

export const myPromoter = (params) => request.post('/p/myPromoter', params) //我的分享

export const loadRule = (params) => request.get('/loadRule', params) //分享规则

export const toApplyCash = (params) => request.post('/p/withdraw', params) //提取当前可提现金额

// export const applyCash = params => request.post("/p/applyWithward", params); //处理申请提现
export const applyCash = (params) => request.post('/p/submitWithdrawApply', params) //处理申请提现

export const myCommisDetailList = (params) => request.post('/p/paymentDetailsList', params) //佣金明细

export const distributionTeamAwardBillDetail = (params) => request.get('/p/distributionTeam/award/billDetail', params) //分销团队奖详情列表

export const showAchievementRewardsFlag = (params) => request.get('/p/distributionTeam/award/showAchievementRewardsFlag', params) //是否显示达标奖励tab

export const withdrawList = (params) => request.post('/p/withdrawList', params) //提现记录

export const myPromoterUser = (params) => request.post('/p/myPromoterUser', params) //我推广的好友

export const inviteUserList = (params) => request.post('/p/inviteUserList', params) //推广客户列表

export const promoteOrder = (params) => request.post('/p/promoteOrder', params) //分享订单列表

export const promoteProducts = (params) => request.post('/p/promoteProducts', params) //推广商品列表

export const getPromotePosterData = (params) => request.post('/p/h5PromotePosterData', params) //推广海报

export const distribution = (params) => request.post('/p/distribution/invite', params) //邀请好友

export const bindDistri = (params) => request.post('/buildInvitationRelationship', params) //绑定分享

export const loadWithdrawReceiverAccount = (params) => request.post('/p/loadWithdrawReceiverAccount', params) //提现收款账户

export const defaultWithdrawBankCard = (params) => request.post('/p/defaultWithdrawReceiverAccount', params) //设置默认提现银行卡

export const addWithdrawBankCard = (params) => request.post('/p/addWithdrawBankCard', params, config) //添加/修改提现银行卡

export const delWithdrawBankCard = (params) => request.post('/p/delWithdrawBankCard', params) //删除

export const editWithdrawBankCard = (params) => request.post('/p/editWithdrawBankCard', params) //修改提现银行卡页面--回显

export const getWithdrawDetail = (params) => request.post(`/p/getWithdrawDetail`, params)

// 获取分享类型信息
export const getCommissionTypeInfo = (params) => request.get(`/p/getCommissionTypeInfo`, params)

// 积分提现申请页面数据
export const integralWithdraw = (params) => request.post(`/p/integral/withdraw`, params)

// 提交积分提现申请
export const submitWithdrawApply = (params) => request.post(`/p/integral/submitWithdrawApply`, params)

//积分提现详情
export const integralWithdrawDetail = (params) => request.post(`/p/integral/withdrawDetail`, params)

// 积分提现记录列表
export const integralWithdrawList = (params) => request.post(`/p/integral/withdrawList`, params)

// 成长值列表
export const getShareSalesGrowthList = (params) => request.post(`/p/shareSalesGrowth/queryLog`, params)

// 总成长值
export const getTotalGrowth = (params) => request.post(`/p/shareSalesGrowth/myGrowth`, params)

// 规则说明详情
export const getShareRule = (params) => request.get(`/p/getShareRule`, params)
// 提现规则说明
export const withdrawRule = (params) => request.post(`/p/withdrawRule`, params)


// 业绩详情列表
export const awardBillDetail = (params) => request.get(`/p/performance/award/billDetail`, params)

// 团队奖励首页
export const awardIndex = (params) => request.get(`/p/performance/award/index`, params)

// 团队分享业绩详情列表
export const distributionTeamAward = (params) => request.get(`/p/distributionTeam/award/billDetail`, params)

// 达标奖励首页
export const distributionTeamAwardIndex = (params) => request.get(`/p/distributionTeam/award/index`, params)

// 我的下线列表
export const subordinateList = (params) => request.post(`/p/my/subordinate/list`, params)

// 我的下线相关统计数据
export const subordinateParam = (params) => request.post(`/p/my/subordinate/param`, params)
